<html>
	<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
	<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
	<%@ page language="java" isErrorPage="true"%>


	<script language="JavaScript" src="md5.js"></script>
	<script language="JavaScript">
    function doLogin()
    {
    document.form1.j_password.value = hex_md5(document.form1.j_password.value);
    return true;
    }
</script>


	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<title>StaBle</title>
		<link rel="stylesheet" href="css/styles.css" type="text/css" id="skin" />
	</head>


	<body>
		<form name="form1" method="POST" action="login.do"
			onsubmit="return doLogin()">
			<table class="wm_hide" id="info">

				<tr>
					<td class="wm_info_message" id="info_message">
						<bean:message key="login.title" />
					</td>
				</tr>
			</table>
			<div align="center" id="content" class="wm_content">
				<div class="wm_logo" id="logo" tabindex="-1"></div>
				<div id="login_screen">
					<div class="wm_hide" id="login_error"></div>
					<br />
					<br />
					<br />
					<br />
					<br />
					<br />
					<br />
					<table class="wm_login wm_fixed" id="login_table" border="0"
						cellspacing="0" cellpadding="0">
						<col width="70"></col>
						<col width="88"></col>
						<col width="70"></col>
						<col width="33"></col>
						<col width="42"></col>
						<tr>
							<td class="wm_login_header" colspan="5">
								Willkommen bei StaBle
							</td>
						</tr>
						<tr id="login_cont">
							<td class="wm_title">
								<bean:message key="login.username" />
							</td>
							<td colspan="4" id="login_parent">
								<input class="wm_input" type="text" value="" id="login"
									name="j_username" maxlength="255"
									onfocus="this.className = 'wm_input_focus';"
									onblur="this.className = 'wm_input';" size="30" />
							</td>
						</tr>
						<tr>
							<td class="wm_title">
								<bean:message key="login.password" />
							</td>

							<td colspan="4">
								<input class="wm_input wm_password_input" type="password"
									name="j_password" id="password" maxlength="255"
									onfocus="this.className = 'wm_input_focus wm_password_input';"
									onblur="this.className = 'wm_input wm_password_input';" />
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<logic:messagesPresent message="true">
									<div class="message">
										<html:messages id="message" property="username" message="true">
											<font color="red"> ${message} </font>
										</html:messages>
									</div>
								</logic:messagesPresent>
								<html:messages id="message" property="databaseconnection"
									message="true">
									<font color="red"> ${message} </font>
								</html:messages>


							</td>
						</tr>


						<tr>
							<td colspan="4">
								<span class="wm_login_button"> <input class="wm_button"
										type="submit" id="submit" name="submit"
										value='<bean:message key="login.link"/>' /> </span>
							</td>
						</tr>

					</table>
				</div>
			</div>
		</form>
		<script language="JavaScript">
    document.form1.j_username.focus();
</script>
	</body>
</html>
